
package com.showcai.controller.feedBack;

import com.showcai.controller.base.BaseController;
import com.showcai.module.ApplyMaintain;
import com.showcai.module.FeedBack;
import com.showcai.module.Schedule;
import com.showcai.result.ResultObj;
import com.showcai.result.ReturnCode;
import com.showcai.service.FeedBackService;
import com.showcai.service.ScheduleService;
import com.showcai.tools.PushTools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by lutao on 2017/7/14.
 */
@RequestMapping("/feedback")
@Controller
public class feedBackController extends BaseController {
    @Autowired
    FeedBackService feedBackService;

    /**
     * 意见反馈
     * @return
     */
    @RequestMapping(value = "/setFeedback")
    @ResponseBody
    public String feedback(FeedBack feedBack) {
        System.out.println("获得的实体类！——————"+feedBack);
        logger.info("feedback==================================>>>>>>");
        ResultObj resultObj = new ResultObj();
        feedBackService.insertFeedBack(feedBack);
        resultObj.setCode(ReturnCode.SUCCESS.getCode());
        resultObj.setMsg(ReturnCode.SUCCESS.getMsg());
        return resultObj.toJson();
    }
}
